<template>
  <el-container>
    <basic-crud :option="option" businessUrl="/bd/materialClassifyController">
    </basic-crud>
  </el-container>
</template>

<script setup>
const option = {
  menuWidth: 250,
  isTableTree: true,
  calcHeight: 10,
  addSonBtn: true,
  column: [
    {
      label: "编号",
      prop: "code",
      search: true,
      sortable: true,
      rules: [{ required: true, message: "编号不能为空" }],
    },
    {
      label: "名称",
      prop: "name",
      search: true,
      sortable: true,
      rules: [{ required: true, message: "名称不能为空" }],
    },
    {
      label: '产品/物料',
      prop: 'topClassify',
      type: 'radio',
      dicData: [{
        value: '产品',
        label: "产品"
      }, {
        value: "物料",
        label: "物料"
      }]
    },
    
    {
      label: "排序",
      prop: "orderNum",
      width: 50,
      type: "number",
      step: 10,
      rules: [
        {
          type: "number",
          message: "排序号必须为数字值",
          trigger: "blur",
        },
      ],
    },
    {
      label: "描述",
      type: 'textarea',
      span: 24,
      prop: "des",
      sortable: true,
    },
  ],
}
</script>

<style lang="scss" scoped></style>
